//
//  SEGActivitySignModel.m
//  ExcellentHome
//
//  Created by 揭婧雯 on 2017/8/21.
//  Copyright © 2017年 陈区. All rights reserved.
//

#import "SEGActivitySignModel.h"

@implementation SEGActivitySignModel

- (instancetype)initWithDictionary:(NSDictionary*)dictionary
{
    self = [super init];
    if (self) {
        _signAwards = [NSArray array];
        _continuousDays = @"";
        _hadSign = @"";
        _signPic = @"";
        [self setValuesForKeysWithDictionary:dictionary];
    }
    return self;
}
+ (instancetype)initWithDictionary:(NSDictionary*)dictionary
{
    return [[self alloc] initWithDictionary:dictionary];
}
- (void)setValue:(id)value forUndefinedKey:(NSString*)key
{}

- (void)setSignAwards:(NSArray*)signAwards{
    NSMutableArray *arrM = [NSMutableArray array];
    [signAwards enumerateObjectsUsingBlock:^(NSDictionary* obj, NSUInteger idx, BOOL* _Nonnull stop) {
        if ([obj isKindOfClass:[NSDictionary class]]) {
            [arrM addObject:[SEGActivitySignAwardModel initWithDictionary:obj]];
        }
    }];
    _signAwards = [arrM copy];
}

- (void)setContinuousDays:(NSString*)continuousDays{
    _continuousDays = [[SEGUtils ValueToString:continuousDays]copy];
}
- (void)setHadSign:(NSString*)hadSign {
    _hadSign = [[SEGUtils ValueToString:hadSign]copy];
}
- (void)setSignPic:(NSString *)signPic {
    _signPic = [[SEGUtils ValueToString:signPic]copy];
}

@end
